// 白板模式和PDF模式切换
$('input[name="modes"]').change(function () {
    switch (this.id){
        case 'whiteboard-mode':
            toWhiteBoardMode();
            break;
        case 'pdf-mode':
            toPDFMode();
            break;
        default:
            break;
    }
});

function toWhiteBoardMode() {
    $('#pdf-panel').animate({
        top:'100vh'
    });
}

function toPDFMode() {
    //收起弹出内容
    $('.fragment').hide('fast');
    //切入pdf层
    $('#pdf-panel').animate({
        top:'0'
    });
}

$('#highlighter').css('color',$('.color-item').first().css('backgroundColor'));

$('.color-item').click(function () {
    $('#highlighter').css('color', this.style.backgroundColor);
    $('#highlighter-fragment').hide('fast');
});

$('#pdf-file').click(function () {
    document.getElementById('pdf-content-frame').contentWindow.document.getElementById('openFile').click();
});
